<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>气度网 - 气度如水</title>
    <link type="text/css" rel="stylesheet" href="${ctx}/css/company_manage.css" >
    <link rel="stylesheet" href="${ctx}/js/editor/jquery.wysiwyg.css" type="text/css"/> 
	<link rel="stylesheet" href="${ctx}/js/editor/help/lib/ui/jquery.ui.all.css" type="text/css"/> 
	<link rel="stylesheet" href="${ctx}/js/editor/help/lib/ui/jquery.ui.dialog.css" type="text/css"/> 
	<link rel="stylesheet" href="${ctx}/js/editor/help/lib/blueprint/ie.css" type="text/css" media="screen, projection" />
    <script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="${ctx}/js/jquery-1.5.2.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/area.js"></script>
    <script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${ctx}/js/editor/help/lib/jquery.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/jquery.wysiwyg.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/help/lib/ui/jquery.ui.core.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/help/lib/ui/jquery.ui.widget.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/help/lib/ui/jquery.ui.position.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/help/lib/ui/jquery.ui.dialog.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/controls/wysiwyg.image.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/controls/wysiwyg.table.js"></script> 
	<script type="text/javascript" src="${ctx}/js/editor/controls/wysiwyg.link.js"></script>
     <script type="text/javascript"> 		
    (function($) {
        $(document).ready(function() {
            $('#detail').wysiwyg({
                autoload: false,
                controls: {
                "html": {visible: true}
                }
            });
        });
    })(jQuery);
    </script>
</head>

<body>
	<s:if test="urlMark == 1">
	<!-- 添加一个企业 -->
	<form action="${ctx}/my/createCompany" method="post" enctype ="multipart/form-data">
	<div class="container">
		<div class="title">
        	<div class="ctrl">企业资料</div>
        </div> 
        <div class="detail">
        	<li>
				<div class="detail_1">公司名称<font color="#FF0000"> *</font></div>
                <div class="detail_2">
                	<input name="company.companyName" class="inputClass"/> 名称长度不超过120
                </div>
            </li>
        	<li>
				<div class="detail_1">企业类别&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.category">
                    	<option value="" disabled></option>
						<s:iterator value="industryList" var="sort">
						<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
						</s:iterator>
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">公司地址 <font color="#FF0000">*</font></div>
                <div class="detail_2">
                    <select id="province" class="select" name="company.province"></select>
                    <select id="city" class="select" name="company.city"></select>
                    <select id="county" class="select" name="company.country"></select>           	          
                    <input id="countrySide" name="company.street" maxlength="20" value="乡镇、农村" />
                </div>
            </li>
        	<li>
				<div class="detail_1">传真号码&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.foxNo" class="inputClass" /> 长度不超过15
                </div>
            </li>
        	<li>
				<div class="detail_1">电子邮箱<font color="#FF0000"> *</font></div>
                <div class="detail_2">
                	<input name="company.email" class="inputClass"/> 长度不超过36
                </div>
            </li>
        	<li class="pro_ser">
				<div class="detail_1">主营产品或服务&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<textarea id="pro_ser" name="company.proServer">简单罗列一些吧</textarea>
                </div>
            </li>              
        	<li>
				<div class="detail_1">主营行业<font color="#FF0000"> * </font></div>
                <div class="detail_2"><input name="company.industry" class="inputClass" /></div>
            </li>
        	<li>
				<div class="detail_1">行业类型<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<select name="company.industryCategory">
                    	<option value="" disabled></option>
						<s:iterator value="industryCategoryList" var="sort">
						<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
						</s:iterator>
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">经营模式<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<select name="company.managementMode">
                    	<option value="" disabled></option>
						<s:iterator value="managementModeList" var="sort">
						<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
						</s:iterator>
                    </select>
                </div>
            </li> 
        	<li>
				<div class="detail_1">法人代表/负责人<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<input name="company.manager" class="inputClass" />
                </div>
            </li>
        	<li>
				<div class="detail_1">公司注册地<font color="#FF0000"> * </font></div>
                <div class="detail_2">         	          
                    <input name="company.regAddress" class="inputClass"/>
                 </div>
            </li>
			<li>
				<div class="detail_1">注册资金&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.regAmount" class="inputClass"/> / RMB
                </div>
            </li>
			<li>
				<div class="detail_1">员工人数&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.staffCount" class="inputClass"/>
                </div>
            </li>
			<li>
				<div class="detail_1">公司成立时间<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<input class="Wdate"  name="company.establishDate" onClick="WdatePicker()">
                </div>
            </li>
			<li>
				<div class="detail_1">年营业额&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.annualTumover" class="inputClass"/> / RMB
                </div>
            </li>             
			<li>
				<div class="detail_1">年出口额&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.exportAmount" class="inputClass"/> / RMB
                </div>
            </li>
			<li>
				<div class="detail_1">主要经营地点&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainBusinessPlace" class="inputClass"/> 长度不超过36
                </div>
            </li>
			<li>
				<div class="detail_1">主要市场&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainArea" class="inputClass"/> 长度不超过36
                </div>
            </li>
			<li>
				<div class="detail_1">经营品牌&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.brand" class="inputClass"/> 长度不超过36
                </div>
            </li>                                  
        	<li>
				<div class="detail_1">主要客户&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainCustomer" class="inputClass"/> 长度不超过36
                </div>
            </li>
        	<li>
				<div class="detail_1">开户银行&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.bank">
                    	<option value="" disabled></option>
						<s:iterator value="bankList" var="sort">
						<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
						</s:iterator>                  	
                    </select>
                </div>
            </li>  
        	<li>
				<div class="detail_1">银行帐号&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.bankAccount" class="inputClass"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">是否提供OEM代加工&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.oemFlag">
                    	<option value="" disabled></option>
                    	<option value="0">否</option>
                        <option value="1">是</option>                   	
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">研发部门人数&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.devCount" class="inputClass"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">厂房面积&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.area" class="inputClass"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">质量控制&nbsp;&nbsp;</div>
                <div class="detail_2">
                   	<select name="company.quality">
                    	<option value="" disabled></option>
						<s:iterator value="qualityList" var="sort">
						<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
						</s:iterator>                  	
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">月产量&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.monthlyProduction" class="inputClass"/>
                </div>
            </li>            
         	<li>
				<div class="detail_1">公司主页&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input id="homepage" name="company.homePage" class="inputClass"/> 完整的URL地址
                </div>
            </li>
            <li>
                <div class="detail_1">上传公司logo</div>
                <div class="detail_2">      	
                	<input type="file" name="myFile" id="pic"  accept="image/gif"/><font color="red">不大于100KB，200X200的jpg或gif格式图片</font>
                </div>
            </li>
            <li class="summary">
            	<div class="detail_1">公司简介&nbsp;&nbsp;</div>
                <textarea name="company.summary" id="detail">主要内容……</textarea> 
            </li>            
            <li>
				<div class="detail_1"></div>
                <div class="detail_2">
                	<input type="submit" value="确认提交" /> <input type="submit" value="重置" />
                </div>
            </li>
		</div>     
    </div>
    </form>
    </s:if>
    
    <s:elseif test="urlMark == 2">
	<!-- 编辑企业信息 -->
	<form action="${ctx}/my/updateCompany" method="post" enctype ="multipart/form-data">
	<div class="container">
		<div class="title">
        	<div class="ctrl">修改企业资料</div>
        </div> 
        <div class="detail">
        	<li>
				<div class="detail_1">公司名称<font color="#FF0000"> *</font></div>
                <div class="detail_2">
                	<input name="company.companyName" class="inputClass" value="<s:property value="company.companyName"/>"/> 名称长度不超过120
                </div>
            </li>
        	<li>
				<div class="detail_1">企业类别&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.category">
						<s:iterator value="industryList" var="sort">
							<s:if test="#sort.typeCode == company.category">
								<option value="<s:property value="#sort.typeCode"/>" selected><s:property value="#sort.typeName"/></option>
							</s:if>
							<s:else>
								<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>							
							</s:else>
						</s:iterator>
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">公司地址 <font color="#FF0000">*</font></div>
                <div class="detail_2">
                    <select id="province" class="select" name="company.province"></select>
                    <select id="city" class="select" name="company.city"></select>
                    <select id="county" class="select" name="company.country"></select>           	          
                    <input id="countrySide" name="company.street" maxlength="20" value="乡镇、农村" />
                    <s:property value="company.address"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">传真号码&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.foxNo" class="inputClass" value="<s:property value="company.foxNo"/>"/> 长度不超过15
                </div>
            </li>
        	<li>
				<div class="detail_1">电子邮箱<font color="#FF0000"> *</font></div>
                <div class="detail_2">
                	<input name="company.email" class="inputClass" value="<s:property value="company.email"/>"/> 长度不超过36
                </div>
            </li>
        	<li class="pro_ser">
				<div class="detail_1">主营产品或服务&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<textarea id="pro_ser" name="company.proServer">
                		<s:property value="company.proServer"/>
                	</textarea>
                </div>
            </li>              
        	<li>
				<div class="detail_1">主营行业<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<input name="company.industry" class="inputClass" value="<s:property value="company.industry"/>"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">行业类型<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<select name="company.industryCategory">
						<s:iterator value="industryCategoryList" var="sort">
							<s:if test="#sort.typeCode == company.industryCategory">
								<option value="<s:property value="#sort.typeCode"/>" selected><s:property value="#sort.typeName"/></option>
							</s:if>
							<s:else>
								<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
							</s:else>
						</s:iterator>
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">经营模式<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<select name="company.managementMode">
						<s:iterator value="managementModeList" var="sort">
							<s:if test="#sort.typeCode == company.managementMode">
								<option value="<s:property value="#sort.typeCode"/>" selected><s:property value="#sort.typeName"/></option>
							</s:if>
							<s:else>
								<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
							</s:else>
						</s:iterator>
                    </select>
                </div>
            </li> 
        	<li>
				<div class="detail_1">法人代表/负责人<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<input name="company.manager" class="inputClass" value="<s:property value="company.manager"/>"/>
                </div>
            </li>
        	<li>
				<div class="detail_1">公司注册地<font color="#FF0000"> * </font></div>
                <div class="detail_2">         	          
                    <input name="company.regAddress" class="inputClass" value="<s:property value="company.regAddress"/>"/>
                 </div>
            </li>
			<li>
				<div class="detail_1">注册资金&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.regAmount" class="inputClass" value="<s:property value="company.regAmount"/>"/> / RMB
                </div>
            </li>
			<li>
				<div class="detail_1">员工人数&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.staffCount" class="inputClass" value="<s:property value="company.staffCount"/>"/> 人
                </div>
            </li>
			<li>
				<div class="detail_1">公司成立时间<font color="#FF0000"> * </font></div>
                <div class="detail_2">
                	<input class="Wdate"  name="company.establishDate" onClick="WdatePicker()" value="<s:property value="company.establishDate"/>" />
                </div>
            </li>
			<li>
				<div class="detail_1">年营业额&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.annualTumover" class="inputClass" value="<s:property value="company.establishDate"/>"/> / RMB
                </div>
            </li>             
			<li>
				<div class="detail_1">年出口额&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.exportAmount" class="inputClass" value="<s:property value="company.exportAmount"/>"/> / RMB
                </div>
            </li>
			<li>
				<div class="detail_1">主要经营地点&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainBusinessPlace" class="inputClass" value="<s:property value="company.mainBusinessPlace"/>"/> 长度不超过36
                </div>
            </li>
			<li>
				<div class="detail_1">主要市场&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainArea" class="inputClass" value="<s:property value="company.mainArea"/>" /> 长度不超过36
                </div>
            </li>
			<li>
				<div class="detail_1">经营品牌&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.brand" class="inputClass" value="<s:property value="company.brand"/>" /> 长度不超过36
                </div>
            </li>                                  
        	<li>
				<div class="detail_1">主要客户&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.mainCustomer" class="inputClass" value="<s:property value="company.mainCustomer"/>" /> 长度不超过36
                </div>
            </li>
        	<li>
				<div class="detail_1">开户银行&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.bank">
						<s:iterator value="bankList" var="sort">
							<s:if test="#sort.typeCode == company.bank">
								<option value="<s:property value="#sort.typeCode"/>" selected><s:property value="#sort.typeName"/></option>
							</s:if>
							<s:else>
								<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
							</s:else>
						</s:iterator>                  	
                    </select>
                </div>
            </li>  
        	<li>
				<div class="detail_1">银行帐号&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.bankAccount" class="inputClass" value="<s:property value="company.bankAccount"/>" />
                </div>
            </li>
        	<li>
				<div class="detail_1">是否提供OEM代加工&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<select name="company.oemFlag">
						<s:if test="company.oemFlag == 0">
							<option value="0" selected>否</option>
							<option value="1">是</option>
						</s:if>
                    	<s:else>
							<option value="0" >否</option>
							<option value="1" selected>是</option>
                    	</s:else>               	
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">研发部门人数&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.devCount" class="inputClass" value="<s:property value="company.devCount"/> "/> 人
                </div>
            </li>
        	<li>
				<div class="detail_1">厂房面积&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.area" class="inputClass" value="<s:property value="company.area"/>"/> m2
                </div>
            </li>
        	<li>
				<div class="detail_1">质量控制&nbsp;&nbsp;</div>
                <div class="detail_2">
                   	<select name="company.quality">
						<s:iterator value="qualityList" var="sort">
							<s:if test="#sort.typeCode == company.quality">
								<option value="<s:property value="#sort.typeCode"/>" selected><s:property value="#sort.typeName"/></option>
							</s:if>
							<s:else>
								<option value="<s:property value="#sort.typeCode"/>"><s:property value="#sort.typeName"/></option>
							</s:else>
						</s:iterator>                  	
                    </select>
                </div>
            </li>
        	<li>
				<div class="detail_1">月产量&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input name="company.monthlyProduction" class="inputClass" value="<s:property value="company.monthlyProduction"/>"/>
                </div>
            </li>            
         	<li>
				<div class="detail_1">公司主页&nbsp;&nbsp;</div>
                <div class="detail_2">
                	<input id="homepage" name="company.homePage" class="inputClass" value="<s:property value="company.homePage"/>"/> 完整的URL地址
                </div>
            </li>
            <li>
                <div class="detail_1">上传公司logo</div>
                <div class="detail_2">      	
                	<input type="file" name="myFile" id="pic"  accept="image/gif"/><font color="red">不大于100KB，200X200的jpg或gif格式图片</font>
                </div>
            </li>
            <li class="summary">
            	<div class="detail_1">公司简介&nbsp;&nbsp;</div>
                <textarea name="company.summary" id="detail">
					<s:property value="company.summary" />
				</textarea> 
            </li>            
            <li>
				<div class="detail_1"></div>
                <div class="detail_2">
                	<input type="submit" value="确认提交" /> <input type="submit" value="重置" />
                </div>
            </li>
		</div>     
    </div>
    </form>
    </s:elseif>
    <s:else>
    	操作失败！无权限
    </s:else>
    <script type="application/javascript">
    	//初始化地区
		setup()
	</script>     
</body>
</html>
